import 'package:flutter_demo/pages/common/common_appbar.dart';
import 'package:flutter_demo/widgets/search_widget.dart';
import 'package:flutter/material.dart';

/// @author longzipeng
/// @创建时间：2022/3/30
/// 下拉选择demo
class SearchDemoPage extends StatefulWidget {
  const SearchDemoPage({Key? key}) : super(key: key);

  @override
  State<SearchDemoPage> createState() => _SearchDemoPageState();
}

class _SearchDemoPageState extends State<SearchDemoPage> {
  /// 查询数据
  search(value) {
    print("搜索的值为：$value");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: CommonAppbar(
          title: "搜索框演示",
        ),
        body: Center(
          child: SearchWidget(
            onEditingComplete: search,
          ),
        ));
  }
}
